import { defineStore } from 'pinia'
import { ref } from 'vue'

export const userInfoStore = defineStore('userInfo', () => {
  const userInfo = ref(null)

  function setUserInfo(data) {
    userInfo.value = data
  }

  function clearUserInfo() {
    userInfo.value = null
  }

  return {
    userInfo,
    setUserInfo,
    clearUserInfo,
  }
})
